@include('share.__header');
<style>
*{ margin:0; padding:0;}
#box{ margin:50px auto; width:540px; min-height:400px; background:#FF9}
#demo{ margin:50px auto; width:540px; min-height:800px; background:#CF9}
</style>
<link rel="stylesheet" href="{{asset('post/css/post.css')}}">
<link rel="stylesheet" type="text/css" href="{{asset('post/imguploadscript/diyUpload/css/webuploader.css')}}">
<link rel="stylesheet" type="text/css" href="{{asset('post/imguploadscript/diyUpload/css/diyUpload.css')}}">
    <main class="center-block">
      @include('share.errors')
      @include('share.messages')
        <form action="{{ url('/createArticle') }}" method="post" class="row form clearfix">
            {{ csrf_field() }}
            <div class="pull-left col-xs-8 postLeft">
                <textarea id="textarea" class="center-block" placeholder="分享一件新鲜事..." name="content"></textarea>
                <div class="clearfix postLeftBottom">
                    <!-- <div class="postBotLeft pull-left">
                        <span class="pull-left phontText">照片</span>
                        <input type="file" class="pull-left upPhoto">
                    </div> -->
                    <div class="postBotRight pull-right clearfix">
                        <input type="checkbox" id="anonymous" class="pull-left" value="1" name="incognito">
                        <label for="anonymous" class="anonymous pull-left">匿名投稿</label>
                    </div>
                </div>
                <input type="submit" value="发布" class="postSubmit">
            </div>
            <ul class="pull-right col-xs-4 postRight">
                <li class="contributeLi">
                    <h4 class="contributeTitle">投稿须知</h4>
                </li>
                <li class="contributeLi">1. 发帖不能含政治、色情、广告、诽谤、歧视等内容</li>
                <li class="contributeLi">2. 发帖经过审核后发表。</li>
                <li class="contributeLi">3. 转载请注明出处。</li>
                <li class="contributeLi lastLi">4. 我已阅读并同意海盗cos的《用户协议》以及《隐私政策》</li>
            </ul>
        </form>
    </main>

    <div id="box">
      <div id="test" ></div>
    </div>

@include('share.__login')
</body>
<script src="{{asset('public/js/jquery.min.js')}}"></script>
<script src="{{asset('public/js/bootstrap.min.js')}}"></script>
<script src="{{asset('public/js/navbar.js')}}"></script>
<script src="{{asset('post/js/post.js')}}"></script>
<script src="{{asset('post/imguploadscript/jquery.js')}}"></script>
<script type="text/javascript" src="{{asset('post/imguploadscript/diyUpload/js/webuploader.html5only.min.js')}}"></script>
<script type="text/javascript" src="{{asset('post/imguploadscript/diyUpload/js/diyUpload.js')}}"></script>
<script>
    $(function () {
        $('[data-toggle="tooltip"]').tooltip();
    })

/*
* 服务器地址,成功返回,失败返回参数格式依照jquery.ajax习惯;
* 其他参数同WebUploader
*/

$('#test').diyUpload({
	url:"{{url('ajaxupload')}}",
	success:function( data ) {
		console.info( data );
	},
	error:function( err ) {
		console.info( err );
	},
  fileNumLimit:9,
  fileSingleSizeLimit:1024*1024,
});

$('#as').diyUpload({
	url:"{{url('ajaxupload')}}",
	success:function( data ) {
		console.info( data );
	},
	error:function( err ) {
		console.info( err );
	},
	buttonText : '选择文件',
	chunked:true,
	// 分片大小
	chunkSize:512 * 1024,
	//最大上传的文件数量, 总文件大小,单个文件大小(单位字节);
	fileNumLimit:9,
	fileSizeLimit:500000 * 1024,
	fileSingleSizeLimit:50000 * 1024,
	accept: {}
});
</script>
</html>
